package com.sky.mapper;

import com.sky.entity.ShoppingCart;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface ShoppingCartMapper {
    //根据 id查询
    ShoppingCart findShoppingCartById(ShoppingCart shoppingCart);
    //添加
    void add(ShoppingCart shoppingCart);
    //修改
    void updateNumberById(ShoppingCart newShoppingCart);

    List<ShoppingCart> getCurrentId(Long userId);
    //删除
    void delShoppingCart(ShoppingCart shoppingCart);
    //清空
    void deleteCart(Long userId);

    List<ShoppingCart> findShoppingCartUserById(Long userId);
}

